<style>
.fui-page {
   background: {{main.syscolor || '#7c1cc9'}};
   bottom:0;
}
.btn.btn-success-o {
    background: transparent;
    color: {{main.syscolor || '#7c1cc9'}};
    border: 1px solid {{main.syscolor || '#7c1cc9'}};
}
</style>
<div class="fui-page fui-page-current">
	<div class='fui-content' style="background: {{main.syscolor || '#7c1cc9'}};padding-top:2rem;">
	<div style="padding:0.5rem">
		<div class="top" style="margin-bottom:-1.3rem;z-index:108">
			<div class="c">
				<img style="width:3rem;height:3rem;border-radius:100%" src="{{tomedia(pagedata.account.logo) || '../core/resource/images/web-logo.jpg'}}"  />
			</div>
		</div>
		<div class="fui-code" style="background: linear-gradient(#fdf5d8, #fcd7f7);border-radius: 0.5rem;padding-bottom:1rem">
		<div class="fui-line-title" style="padding-top:1.3rem" ng-click="tool.clip(pagedata.member.id)">
			<div>{{pagedata.account.title}}</div>
		</div>
		<div style="padding:0 0.5rem">
		<div class="fui-icon-group noborder col-3" style="background:none;margin-top:0.5rem">
			<div ng-repeat="item in pagedata.feeset" ng-click="pagedata.post.fee=item.fee;pagedata.post.payfee=item.payfee;pagedata.post.type=$index" class="fui-icon-col-sm" style="margin:0;padding:0.2rem">
					<div ng-class="{'btn btn-success-o':1,'active':pagedata.post.type==$index}" style="line-height:1.4;margin:0;padding:0.3rem;width:100%">
					<div class="bold">额度￥{{item.fee}}</div>
					<div class="subtitle" style="font-size:12px;">价格 ￥{{item.payfee}}</div>
					</div>
			</div>
		</div>
		<div class='fui-cell-group' style="background:none;">
			<div class='fui-cell'>
				<div class='fui-cell-label bold'>充值额度</div>
				<div class="fui-cell-info c000 bold" style="font-size:1rem">
				<input type="text" class='fui-input' placeholder="请输入充值额度" ng-model="pagedata.post.fee" ng-change="pagedata.upfee()"/>
				</div>
			</div>
			<div class='fui-cell'>
				<div class='fui-cell-label bold'>充值手机号</div>
				<div class="fui-cell-info c000 bold" style="font-size:1rem">
				<input type="text" class='fui-input' placeholder="请输入手机号" ng-model="pagedata.post.mobile"/>
				</div>
			</div>
		</div>
		</div>
		<a href="javascript:;" class='btn btn-success block' style="border-radius:1rem;line-height: 3;margin-top:1rem" ng-click="pagedata.recharge()">确认充值（支付：￥{{pagedata.post.payfee ||'0.00'}}）</a>
		<a href="javascript:;" class='btn btn-gray block' style="border-radius:1rem;line-height: 3;" ng-click="access_json('jy_feemobile/order/')">查看订单</a>
		</div>
	</div>
</div>
<div ng-include="sys_html('common/_footer')"></div>
<script>
scope.pagedata.recharge=function(){
	scope.post_json('/index/post/',scope.pagedata.post,function(res){
		console.log('pay_id');console.log(res.pay_id);
		scope.tool.pay(res.pay_id,function(res){
				console.log('收到支付结果！');
				if(res.type=='success'){
					scope.message('充值成功！','','jy_feemobile/index/');
				}else{
					scope.message('充值失败！'+res.message,'','jy_feemobile/index/');
				}
		},'','','jy_feemobile/index/');
	});
}
scope.pagedata.upfee=function(){
	var isad=false;
	for(var i=0;i<scope.pagedata.feeset.length;i++){
		if(scope.pagedata.feeset[i].fee==scope.pagedata.post.fee){
			scope.pagedata.post.payfee=scope.pagedata.feeset[i].payfee;
			isad=true
		}
	}
	if(!isad){
		scope.pagedata.post.payfee=scope.pagedata.post.fee;
	}
}
</script>